package com.tencent.sr.iris.activity.common.enums;

public enum TaskStatusEnum {
    READY(1, "准备中"),
    TO_BE_LAUNCHED(2, "待上线"),
    BE_ONLINE(3, "已上线"),
    OFFLINE(4, "已下线"),
    VOIDED(5, "已作废");


    private Integer status;

    private String desc;

    TaskStatusEnum(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public static String getByStatus(Integer status) {
        for (TaskStatusEnum taskStatusEnum : TaskStatusEnum.values()) {
            if (taskStatusEnum.getStatus().equals(status)) {
                return taskStatusEnum.getDesc();
            }
        }
        return null;
    }

    public Integer getStatus() {
        return status;
    }

    public String getDesc() {
        return desc;
    }
}
